package com.edu.dao;

import com.edu.pojo.EduNotice;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @author YJF
 */
public interface EduNoticeMapper extends Mapper<EduNotice> {

    /**
     * 查询条件公告信息
     *
     * @param start 开始时间
     * @param end   结束时间
     * @return 查询结果
     */
    @Select("SELECT * FROM edu_notice  WHERE create_time BETWEEN #{start} AND #{end}")
    @Results({
            @Result(column = "notice_id", property = "noticeId"),
            @Result(column = "notice_title", property = "noticeTitle"),
            @Result(column = "notice_content", property = "noticeContent"),
            @Result(column = "create_by", property = "createBy"),
            @Result(column = "create_time", property = "createTime"),
    })
    List<EduNotice> findByPage(String start, String end);
}
